package com.bifrost.service;

import com.bifrost.entity.Customer;
import com.bifrost.common.model.ResultModel;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author rangf
 * @date 2018/1/25
 */
public interface RegAndLogService {

    /**
     * 会员注册
     *
     * @param customerPhone
     * @param message
     * @param customerPassword
     * @param request
     * @param response
     * @return
     */
    public ResultModel regist(String customerPhone, String message, String customerPassword, HttpServletRequest request, HttpServletResponse response);

    /**
     *
     * @param request
     * @param response
     * @return
     */
    public boolean loginAuto(HttpServletRequest request, HttpServletResponse response) throws IOException;

    /**
     * 密码登录
     *
     * @param customerPhone
     * @param customerPassword
     * @param response
     * @param request
     * @return
     */
    public ResultModel loginWithPwd(String customerPhone, String customerPassword, HttpServletResponse response, HttpServletRequest request);

    /**
     * 验证码登录
     *
     * @param customerPhone
     * @param validateCode
     * @param response
     * @param request
     * @return
     */
    public ResultModel loginWithCode(String customerPhone, String validateCode, HttpServletResponse response, HttpServletRequest request);

    /**
     * 注销
     *
     * @param customer
     * @param response
     * @return
     */
    public ResultModel logout(Customer customer, HttpServletResponse response);

}

